package com.ruoyi.eamp.service.impl;

import java.util.List;

import com.ruoyi.eamp.domain.vo.UserAndEquipmentAndMy;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.eamp.mapper.EampEquipmentUseMapper;
import com.ruoyi.eamp.domain.EampEquipmentUse;
import com.ruoyi.eamp.service.IEampEquipmentUseService;

/**
 * 仪器使用记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-08-08
 */
@Service
public class EampEquipmentUseServiceImpl implements IEampEquipmentUseService 
{
    @Autowired
    private EampEquipmentUseMapper eampEquipmentUseMapper;

    /**
     * 查询仪器使用记录
     * 
     * @param logId 仪器使用记录主键
     * @return 仪器使用记录
     */
    @Override
    public EampEquipmentUse selectEampEquipmentUseByLogId(Long logId)
    {
        return eampEquipmentUseMapper.selectEampEquipmentUseByLogId(logId);
    }

    /**
     * 查询仪器使用记录列表
     * 
     * @param eampEquipmentUse 仪器使用记录
     * @return 仪器使用记录
     */
    @Override
    public List<UserAndEquipmentAndMy> selectEampEquipmentUseList(EampEquipmentUse eampEquipmentUse)
    {
        return eampEquipmentUseMapper.selectEampEquipmentUseList(eampEquipmentUse);
    }

    /**
     * 新增仪器使用记录
     * 
     * @param eampEquipmentUse 仪器使用记录
     * @return 结果
     */
    @Override
    public int insertEampEquipmentUse(EampEquipmentUse eampEquipmentUse)
    {
        return eampEquipmentUseMapper.insertEampEquipmentUse(eampEquipmentUse);
    }

    /**
     * 修改仪器使用记录
     * 
     * @param eampEquipmentUse 仪器使用记录
     * @return 结果
     */
    @Override
    public int updateEampEquipmentUse(EampEquipmentUse eampEquipmentUse)
    {
        return eampEquipmentUseMapper.updateEampEquipmentUse(eampEquipmentUse);
    }

    /**
     * 批量删除仪器使用记录
     * 
     * @param logIds 需要删除的仪器使用记录主键
     * @return 结果
     */
    @Override
    public int deleteEampEquipmentUseByLogIds(Long[] logIds)
    {
        return eampEquipmentUseMapper.deleteEampEquipmentUseByLogIds(logIds);
    }

    /**
     * 删除仪器使用记录信息
     * 
     * @param logId 仪器使用记录主键
     * @return 结果
     */
    @Override
    public int deleteEampEquipmentUseByLogId(Long logId)
    {
        return eampEquipmentUseMapper.deleteEampEquipmentUseByLogId(logId);
    }
}
